/*
 * @Author: nengwu 409791297@qq.com
 * @Date: 2020-07-01 23:46:46
 * @LastEditors: mylesshie@gmail.com
 * @LastEditTime: 2020-07-10 16:22:21
 * @description: 
 */ 
import React from 'react'
import {
  View,
  Text,
  Image,
  TouchableOpacity
} from 'react-native'
import styles from './styles'
const defaultHeader = require('@/assets/images/default-header.png')

const FeedItem = props => {
  return (
    <TouchableOpacity onPress={props.onPress}>
      <View style={styles.wrap}>
        <View style={styles.top}>
          <View style={styles.date}>
            <Text style={styles.dateText} numberOfLines={1}>
              {props.createdTime}
            </Text>
          </View>
        </View>
        <View style={styles.bottom}>
          <View style={styles.bl}>
            <Image
              style={styles.header}
              source={{
                uri: props.headImg || defaultHeader
              }}
            />
          </View>
          <View style={styles.br}>
            <View style={styles.title}>
              <Text style={styles.titleText} numberOfLines={2}>
                {props.sugDesc}
              </Text>
            </View>
          </View>
        </View>
      </View>
    </TouchableOpacity>
  )
}

export default FeedItem